package com.jbm.jbmsupplier.activity.loadhomepage.orderadapter

import com.jbm.onehome.iface.IorderEntity

/**
 * Created by 家帮忙 on 2017/9/20.
 */
class LoadOrderData{

fun set(myviewhoder: ManageAdapterOrder.MyViewHoder?,position:Int,order:IorderEntity){
when(order.status){
    "temp"->{
        myviewhoder!!.textview_title.setText("新订单")
    }
    "new"->{
        myviewhoder!!.textview_title.setText("待确认")
    }
    "confirm"->{
        myviewhoder!!.textview_title.setText("作业中")
    }
    "submit"->{
        myviewhoder!!.textview_title.setText("待付款")
    }
    "break"->{
        myviewhoder!!.textview_title.setText("已作废")
    }
    "revoke"->{
        myviewhoder!!.textview_title.setText("已作废")
    }

        "completed"->{
    myviewhoder!!.textview_title.setText("已完成")
}
}
    if (myviewhoder!!.orderdate.toString() != "") {
        myviewhoder.orderdate.setText(order.createDate.toString())
    }
    if (myviewhoder!!.orderfunr.toString() != "") {
        myviewhoder.orderfunr.setText(order.itemDesc)
    }
    if (myviewhoder!!.ordername.toString() != "") {
        myviewhoder.ordername.setText(order.contacts + "")
    }
    if (myviewhoder!!.orderdianhau.toString() != "") {
        myviewhoder.orderdianhau.setText(order.mobile+ "")
    }
    if (myviewhoder!!.orderdizhi.toString() != "") {
        myviewhoder.orderdizhi.setText(order.giText + "")
    }







}










}